<?php echo '<?xml version="1.0" encoding="UTF-8"?>', "\r\n"; ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd">
<?php 	
	foreach ($sitemap_filenames as $item)
	{
		$sitemap_link = $this->config->item('base_url') . $item ;
		echo '<sitemap>';
		echo "\r\n";
		echo '<loc>',$sitemap_link,'</loc>';
		echo "\r\n";
		echo '<lastmod>', date('Y-m-d'), '</lastmod>';
		echo "\r\n";
		echo '</sitemap>';
		echo "\r\n";
	}

?>
</sitemapindex>
